<%@ page contentType="text/html; charset=UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
  <head>
    <title>网络集成采集配置</title>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
    <meta http-equiv="pragma" content="no-cache"/>
	<meta http-equiv="cache-control" content="no-cache"/>
	<meta http-equiv="expires" content="0"/>  
	<%@ include file="../include/common.jsp"%>
	<%@ include file="../include/crontab.jsp"%>
	<%@ include file="../include/timeUnit.jsp"%>
	<style type="text/css">
		.searchFormStyle div{
			float:left;
			width:290px;
		}
	
	</style>
	<script type="text/javascript">
		
		$(document).ready(function(){
			var weekOb =weekInit();
			$("input[type=button]").click(function(){
				var param = weekOb.results();
				if(param==0){
					return;
				}
				
				$.ajax({
					type:'post',
					url:'collect-task!saveNetconfig.action',
					data:{resId:'${res.id}',param:param},
					global:false,
					async:false,
					cache:false,
					dataType:'json',
					success:function(data,textStatus){
						if(data.flag==true){
						 getTopWin(window).getMessageBox().alert('保存成功!','提示');
						}else{
						 getTopWin(window).getMessageBox().alert('保存失败!','提示');
						}
					},
					error:function(statu,error){
						getTopWin(window).getMessageBox().alert('保存配置数据出错!'+error,'错误');
					}
				});
			});
		});
		
		function weekInit(){
			var weekOb = new SimpleTimeUnit("week");
			weekOb.show();          
			weekOb.reversal('300');
			return weekOb;
		}
		
	</script>

  </head>
  
  <body>
    <div class="searchFormStyle" id="searchParameter" style="padding:10px 10px 10px 10px;">
    	<label>采集周期:</label>
    	<div id='week'  ></div>
    	<div class="btn-div" >
    	<!--  
    		<input type="button" value="保存" class="btn-4" style="display:${hasEditResPrivilege?'block':'none'};" />-->
    		<input type="button" value="保存" class="btn-4"  />
    	</div>
    </div>
  </body>
</html>
